package com.telit.android.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="执行任务参数", description="执行任务参数")
public class ExecuteTaskDto {

    @ApiModelProperty(value = "子任务ID")
    private Long subTaskId;

    @ApiModelProperty(value = "任务类型")
    @NotBlank(message = "任务类型不能为空")
    private String taskType;

    @ApiModelProperty(value = "巡护ID")
//    @NotBlank(message = "轨迹id不能为空")
    private String trackId;

    @ApiModelProperty(value = "护林员ID")
    @NotNull(message = "护林员id不能为空")
    private Long forestkeeperId;

    @ApiModelProperty(value = "任务状态")
    private String status;

    @ApiModelProperty(value = "主任务id")
    @NotNull(message = "主任务id不能为空")
    private Long taskId;

    @ApiModelProperty(value = "任务开始时间")
    @NotNull(message = "主任务时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
}
